package main

import (
    "github.com/gin-gonic/gin"
    "server/app"
    "server/middleware"
    "server/router"
)

//go build && ./server
//CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
func main() {
    app.Startup(func(engine *gin.Engine) {
        engine.Use(middleware.ValidMiddleware())    //注册安全验证中间件
        engine.Use(middleware.RecoveryMiddleware()) //注册统一错误处理中间件
        router.Register(engine)                     //注册路由
    })
}
